//
//  ViewController.m
//  FYNetworking
//
//  Created by Felix Yin on 2017/5/5.
//  Copyright © 2017年 Felix Yin. All rights reserved.
//

#import "ViewController.h"
#import "FYTestViewController.h"

@interface ViewController ()

@property (nonatomic, strong) UIButton *pushBtn;

@end

@implementation ViewController

- (void)viewDidLoad {
    self.view.backgroundColor = [UIColor whiteColor];
    [super viewDidLoad];
    
    UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 30)];
    [btn setTitle:@"PushVC" forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(pushViewController) forControlEvents:UIControlEventTouchUpInside];
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:btn];
    
}


- (void) pushViewController{
    FYTestViewController *viewController = [[FYTestViewController alloc] init];
    [self.navigationController pushViewController:viewController animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
